package com.qupai.mapper;



import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qupai.dto.GoodsSalesDTO;
import com.qupai.entity.Orders;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper extends BaseMapper<Orders> {

    /**
     * 动态查
     */
    Orders list(Orders orders);

    /**
     * 根据动态条件统计营业额
     */
    Double sumByMap(Map map);

    /**
     * 统计指定时间区间内的销售排名前10
     */
    List<GoodsSalesDTO> getSalesTop10(LocalDateTime begin, LocalDateTime end);

}
